Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add transfer modules #40

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

add transfer modules #40

wants to merge 30 commits into from

Conversation

hy395
Copy link

@hy395 hy395 commented Sep 4, 2024

Description of your changes

  • add hound_transfer.py:

    • main script for running transfer;
  • add transfer_helper.py:

    • helper functions to insert adapter layers to existing architecture.
    • helper functions to merge adapters.
  • layers.py:

    • added IA3, IA3_ff, Lora, Locon, AdapterHoulsby class definitions;
    • add seqlen_train argument to allow model to take any input seq length;
    • add additional arguments to SqueezeExcite class;
  • blocks.py:

    • add options to specify adapter in json file,
    • add additional arguments to SqueezeExcite.
  • seqnn.py:

    • add methods to insert adapter;
  • hound_eval.py:

    • optionally use fl16;
  • hound_eval_spec.py:

    • optionally use fl16;
  • trainer.py:

    • add option to do loss scaling;
    • add function to print GPU memory usage when training;

evaluation code:

  • add borzoi_test_genes.py
  • add pygene.py to support borzoi_test_genes.py

test:

  • code to test inserting ia3; see if added trainable variables match expectation.

Issue ticket number and link

Type of change

  • Bug fix
  • New feature
    • Backwards Incompatible?
  • Refactoring / code clean-up
  • Documentation add / update
  • Automated Test
  • Other (please specify)

(If applicable) How has this been tested?

see if trainable variables match expectation.

src/baskerville/blocks.py Outdated Show resolved Hide resolved
src/baskerville/helpers/transfer_helper.py Outdated Show resolved Hide resolved
src/baskerville/layers.py Outdated Show resolved Hide resolved
src/baskerville/pygene.py Outdated Show resolved Hide resolved
src/baskerville/scripts/borzoi_test_genes.py Outdated Show resolved Hide resolved
@@ -42,7 +43,7 @@ def main():
parser.add_option(
"-c",
dest="class_min",
default=80,
default=5,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for big borzoi, this is too low; I want to exclude all of the ChIP groups.

src/baskerville/scripts/hound_transfer.py Outdated Show resolved Hide resolved
src/baskerville/trainer.py Outdated Show resolved Hide resolved
src/baskerville/trainer.py Outdated Show resolved Hide resolved
@davek44 davek44 mentioned this pull request Oct 15, 2024
"transfer": {
"mode": "adapter",
"adapter": "locon",
"adapter_latent": 8,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like the code parses this for locon.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are correct. i removed the option to change adapter_latent in locon4, leaving it to default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants